var t = require;
var e = module;
var o = exports;
Object.defineProperty(o, "__esModule", {value: !0});
var n = t("Common"),
    i = t("PlatfromDetailEnum"),
    s = t("SDKEvent"),
    r = (function () {
        function t() {
            this._isRecorder = !1;
        }
        return (
            (t.prototype.init = function () {}),
            (t.prototype.login = function (t) {
                t.success && t.success({isLogin: !0});
            }),
            (t.prototype.getUserInfo = function (t) {
                t.success && t.success({nickName: "匿名用户"}, "");
            }),
            (t.prototype.isOpenShare = function () {
                return !0;
            }),
            (t.prototype.getAnonymousCode = function () {
                return "";
            }),
            (t.prototype.createMoreGamesButton = function () {}),
            (t.prototype.setKeepScreenOn = function () {}),
            (t.prototype.setClipboardData = function (t) {
                console.log("调用剪切板", t.data);
            }),
            (t.prototype.startRecorder = function () {
                (this._isRecorder = !0), cc.systemEvent.emit(s.default.CHANGE_RECORDER_STATE);
            }),
            (t.prototype.stopRecorder = function () {
                (this._isRecorder = !1), cc.systemEvent.emit(s.default.CHANGE_RECORDER_STATE);
            }),
            (t.prototype.getRecorderState = function () {
                return this._isRecorder;
            }),
            (t.prototype.getIsScreenRecordVideo = function () {
                return !0;
            }),
            (t.prototype.getRecorderTime = function () {
                return 0;
            }),
            (t.prototype.getLastAdTime = function () {
                return 0;
            }),
            (t.prototype.showShareBtn = function () {}),
            (t.prototype.hideShareBtn = function () {}),
            (t.prototype.shareRecorder = function (t) {
                t.success && t.success(), console.log("分享视频成功");
            }),
            (t.prototype.showRewardVideo = function (t) {
                t && t.success && t.success(), console.log("展示广告成功");
            }),
            (t.prototype.playSurvey = function (t) {
                t && t.success && t.success(), console.log("展示调查成功");
            }),
            (t.prototype.playScreen = function (t) {
                void 0 === t && (t = 1), console.log("播放插屏", t);
            }),
            (t.prototype.showBanner = function () {}),
            (t.prototype.hideBanner = function () {}),
            (t.prototype.getSurveyState = function () {
                return !0;
            }),
            (t.prototype.getVideoState = function () {
                return !0;
            }),
            (t.prototype.onVideoSuccess = function () {}),
            (t.prototype.vibrateShort = function () {}),
            (t.prototype.vibrateLong = function () {}),
            (t.prototype.sendEvent = function () {}),
            (t.prototype.postMessage = function () {}),
            (t.prototype.setLocalStorage = function (t, e) {
                cc.sys.localStorage.setItem(t, e);
            }),
            (t.prototype.getLocalStorage = function (t) {
                return cc.sys.localStorage.getItem(t);
            }),
            (t.prototype.sendHttpRequest = function (t, e, o, n) {
                for (var i = Object.getOwnPropertyNames(e), s = "", r = 0; r < i.length; r++) {
                    s += i[r] + "=" + e[i[r]] + "&";
                }
                var c = new XMLHttpRequest();
                (c.onreadystatechange = function () {
                    if (4 == c.readyState)
                        if (200 == c.status) {
                            if (o) {
                                var t = JSON.parse(c.responseText);
                                t.ok ? o(t) : n && n(t.msg);
                            }
                        } else n && n(c.status);
                }),
                    c.open("POST", t, !0),
                    c.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;"),
                    c.send(s);
            }),
            (t.prototype.showToast = function (t) {
                console.log("showToast", t);
            }),
            (t.prototype.rating = function () {}),
            (t.prototype.showLoading = function () {}),
            (t.prototype.hideLoading = function () {}),
            (t.prototype.getOpenDataContext = function () {
                return null;
            }),
            (t.prototype.loginWithDouyin = function () {}),
            (t.prototype.loginWithApple = function () {}),
            (t.prototype.dyTokenSuccess = function () {}),
            (t.prototype.appleLoginSuccess = function () {}),
            (t.prototype.loginError = function () {}),
            (t.prototype.hasAppleLogin = function () {
                return !0;
            }),
            (t.prototype.share = function () {}),
            (t.prototype.contentSafe = function (t) {
                var e = {text: t.content, platform: t.platform};
                this.sendHttpRequest(
                    n.default.contentSafeTT,
                    e,
                    function (e) {
                        e.valid ? t.callBack(!0) : t.callBack(!1);
                    },
                    function () {
                        t.callBack(!1);
                    }
                );
            }),
            (t.prototype.registerAccChange = function () {}),
            (t.prototype.unRegisterAccChange = function () {}),
            (t.prototype.pay = function () {}),
            (t.prototype.onPaymentSuccess = function () {}),
            (t.prototype.onShow = function (t) {
                t({});
            }),
            (t.prototype.getLaunchOptionsSync = function () {
                return {};
            }),
            (t.prototype.getPlatFormDetail = function () {
                return i.default.WEB;
            }),
            (t.prototype.showCustomAd = function () {}),
            (t.prototype.hideCustomAd = function () {}),
            (t.prototype.showCustomAdBig = function () {}),
            (t.prototype.hideCustomAdBig = function () {}),
            (t.prototype.showGridAd = function () {}),
            (t.prototype.hideGridAd = function () {}),
            (t.prototype.showGridScorllAd = function () {}),
            (t.prototype.hideGridScorllAd = function () {}),
            t
        );
    })();
o.default = r;
